-
Notifications
You must be signed in to change notification settings - Fork 32
used co-pliot to copy examples from yaml files to json schema #659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: brapi-V2.1
Are you sure you want to change the base?
Conversation
| "string" | ||
| ] | ||
| ], | ||
| "example": "71 Pilgrim Avenue Chevy Chase MD 20815" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer this not be a real place. It shouldn't really matter but it seems weird to publish a real address publicly without knowing exactly what is there. Also, BrAPI is international so it should include the country code.
I would suggest "123 First Street, Townsville, AB 12345, USA"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was in the original yaml, I will change it in both places
| }, | ||
| "type": "array", | ||
| "example": [ | ||
| "examples": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change needs to be double checked. These are all Array type objects, so a singular example would be an array of values. changing the key to examples is incorrect, unless there is a good technical reason
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was following the Java representation of JSON schema, which has both example and examples. example take an object and examples a list of objects. https://json-schema.org/understanding-json-schema/reference/annotations. I think the singular ‘example’ is just a helper function for the case when the list has a single element. In OpenAPI you can use either https://swagger.io/docs/specification/v3_0/adding-examples/, but example is singular and examples is a list.
BrapiCoordinatorSelby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments. I think co-pilot messed up the Request objects
No description provided.